<template>
	<view>
		<uni-table border stripe emptyText="暂无更多数据">
			<uni-tr>
				<uni-th width="100">联赛id</uni-th>
				<uni-th width="120">联赛类型</uni-th>
				<uni-th width="150">联赛总轮次</uni-th>
			</uni-tr>
			<uni-tr v-for="li in leagueInfo" v-bind:key="li.id">
				<uni-td>{{li.leagueid}}</uni-td>
				<uni-td>{{li.leaguetype}}</uni-td>
				<uni-td>{{li.rounds}}</uni-td>
			</uni-tr>
		</uni-table>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				leagueInfo:[]
			}
		},
		
		methods: {
			//获取联赛信息
			loadLeagueInfo(){
				uni.request({
					url:"/api/20002/info/leagueinfo/list",
					success: (res) => {
					    this.leagueInfo = res.data.data;
					},
				});
			}
		},
		
		created() {
			this.loadLeagueInfo();//获取联赛信息
		}
	}
</script>

<style>

</style>
